import React from "react";
import { Radio } from "antd";

const TableTab = ({value, onChange, options, dataValue='value', dataLabel='label', ...props}) => {

  return (
    <Radio.Group value={value} buttonStyle="solid" {...props}>
      {
        options?.map((v) => (
          <Radio.Button key={v?.[dataValue]} value={v?.[dataValue]}>{v?.[dataLabel]}</Radio.Button>
        ))
      }
    </Radio.Group>
  );
}
export default TableTab;